home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 285 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. Path: sdrc.com!thor!scjones
  2. From: larry.jones@sdrc.com (Larry Jones)
  3. Newsgroups: comp.std.c
  4. Subject: Re: size_t
  5. Date: 2 Feb 1996 15:44:08 GMT
  6. Organization: SDRC Engineering Services
  7. Distribution: world
  8. Message-ID: <4etbg8$sva@info1.sdrc.com>
  9. References: <4eo3sc$l14@info1.sdrc.com> <4es27i$hd5@alterdial.UU.NET>
  10. NNTP-Posting-Host: thor.sdrc.com
  11. Originator: scjones@thor
  12.  
  13. In article <4es27i$hd5@alterdial.UU.NET>, rex@aussie.com writes:
  14. > >   larry.jones@sdrc.com (Larry Jones) writes:
  15. > >  size_t must indeed be one of the standard types.
  16. > Larry, I recall a discussion in committee re mapping pointers to some 
  17. > integral type. Somewhere we require that I believe. IBM's AS400 came up as it 
  18. > has (I think) 128-bit addresses but no integer type that big. I thought we 
  19. > allowed magic integer types for some things but I may be misremembering.
  20.  
  21. The requirement is in (ANSI) 3.3.4 Cast Operators:
  22.  
  23.     A pointer may be converted to an integral type.  The size of
  24.     integer required and the result are implementation-defined.  If
  25.     the space provided is not long enough, the behavior is
  26.     undefined.
  27.  
  28. My recollection of the discussion was that the committee agreed that
  29. the result need not be sensible (e.g., a conforming implementation
  30. could convert all pointers to 42) and that the implementation was free
  31. to document that *no* integral type is long enough.
  32. ----
  33. Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH  45150-2789  513-576-2070
  34. larry.jones@sdrc.com
  35. You should see me when I lose in real life! -- Calvin
  36.